package com.ict.web.service.impl;

import java.util.ArrayList;
import java.util.List;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ict.common.core.text.Convert;
import com.ict.system.domain.SysUserRole;
import com.ict.web.domain.ExtractReview;
import com.ict.web.domain.ExtractRule;
import com.ict.web.mapper.ExtractReviewMapper;
import com.ict.web.service.IExtractReviewService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;


/**
 * 评审任务与抽取的专家关系Service业务层处理
 * 
 * @author xc
 * @date 2022-02-25
 */
@Service
public class ExtractReviewServiceImpl extends ServiceImpl<ExtractReviewMapper, ExtractReview> implements IExtractReviewService
{
    @Autowired
    private ExtractReviewMapper extractReviewMapper;


    @Override
    public int batchInsertExtractReview(Long reviewTaskId,List<Long> extractExpertIdList) {
        List<ExtractReview> list = new ArrayList<ExtractReview>();
        for (Long extractExpertId : extractExpertIdList)
        {
            ExtractReview extractReview = new ExtractReview();
            extractReview.setExtractExpertId(extractExpertId);
            extractReview.setReviewTaskId(reviewTaskId);
            list.add(extractReview);
        }
        return extractReviewMapper.batchInsert(list);
    }
}
